import request from '@/utils/request'

// 查询业务-动态列表
export function listDynamic(query) {
  return request({
    url: '/bussiness/dynamic/list',
    method: 'get',
    params: query
  })
}

// 查询业务-动态详细
export function getDynamic(dynamicId) {
  return request({
    url: '/bussiness/dynamic/' + dynamicId,
    method: 'get'
  })
}

//上移 下移
export function moveUpOrDown(data) {
  return request({
    url: '/bussiness/dynamic/moveUpOrDown',
    method: 'put',
    data
  })
}

// 新增业务-动态
export function addDynamic(data) {
  return request({
    url: '/bussiness/dynamic',
    method: 'post',
    data: data
  })
}

// 修改业务-动态
export function updateDynamic(data) {
  return request({
    url: '/bussiness/dynamic',
    method: 'put',
    data: data
  })
}

// 删除业务-动态
export function delDynamic(dynamicId) {
  return request({
    url: '/bussiness/dynamic/' + dynamicId,
    method: 'delete'
  })
}

export function dynamicBack(dynamicId) {
  return request({
    url: '/bussiness/dynamic/back/' + dynamicId,
    method: 'post'
  })
}
